package com.woniu.auth.service.impl;

import com.woniu.auth.service.LoginRecorder;
import com.woniu.auth.service.LoginRecorder;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ：lgy
 * @description：登录后token存入该对象中
 * @date ：2022/11/14 21:48
 */
@Service
public class LoginRecorderImpl<K, V> implements LoginRecorder<K, V> {
    private Map<K,V> map = new HashMap<K,V>();
    @Override
    public void put(K k, V v) {
        map.put(k,v);
    }

    @Override
    public V get(K k) {
        return map.get(k);
    }

    @Override
    public void remove(K k) {
        map.remove(k);
    }
}
